Activate(t)
{
  IfWinActive,%t%
  {
    return
  }
  SetTitleMatchMode 2    
  DetectHiddenWindows,on
  IfWinExist,%t%
  {
    WinShow
    WinActivate
    return 1
  }
  return 0
}
 
ActivateAndOpen(t,p)
{
  if Activate(t)==0
  {
    Run %p%
    WinActivate
    return
  }
}
 
!f::ActivateAndOpen("My Workspace","C:\Users\chendaoyan\AppData\Local\Postman\Postman.exe")
!g::ActivateAndOpen("Google Chrome","C:\Program Files\Google\Chrome\Application\chrome.exe")
!e::ActivateAndOpen("idea","C:\Program Files\JetBrains\IntelliJ IDEA 2022.3\bin\idea64.exe")
!s::ActivateAndOpen("Navicat","C:\Program Files\PremiumSoft\Navicat Premium 15\navicat.exe")
!i::ActivateAndOpen("goland","C:\Program Files\JetBrains\GoLand 2022.3\bin\goland64.exe")
!t::ActivateAndOpen("Xshell 7","C:\Program Files (x86)\NetSarang\Xshell 7\Xshell.exe")
!v::ActivateAndOpen("Code","C:\Users\chendaoyan\AppData\Local\Programs\Microsoft VS Code\Code.exe")


return
